<template>
  <div class="container">
    <div class="box">
      <a href="">
        <el-image
          class="one"
          :src="songPlayList.picUrl"
          fit="fit">
        </el-image>
      </a>
      <div class="back">
        <i class="el-icon-headset"></i>
        <span class="palyes">{{songPlayList.playCount || songPlayList.playcount}}</span>
        <span class="icon_r" @click="$router.push(`/song/${songPlayList.id}`)">
          <i class="el-icon-video-play"></i>
        </span>
      </div>
    </div>
    <p class="dec">
      <a href="" :title="songPlayList.name" class="dec-title">{{songPlayList.name}}</a>
    </p>
  </div>
</template>

<script>
export default {
  name: 'SongItem',
  props: {
    songPlayList: {
      type: Object,
      require: true
    }
  }

}
</script>

<style lang="less" scoped>
.container {
  .box {
    position: relative;
    width: 140px;
    height: 140px;
    .one {
      width: 140px;
      height: 140px;
    }
    .back {
      padding: 0 10px;
      width: 140px;
      height: 27px;
      line-height: 27px;
      font-size: 12px;
      position: absolute;
      bottom: 0;
      left: 0;
      color: #ccc;
      background-color: rgba(0, 0, 0, .5);
      .icon_r {
        float: right;
      }
      i {
        font-size: 14px;
      }
    }
  }
  .dec {
    text-align: center;
    margin: 10px 0;
    font-size: 14px;
    width: 100%;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    a {
      color: #000;
    }
    a:hover {
      text-decoration:underline;
    }
  }
}
</style>
